package com.common.mybatis.plugins.pagination.dialect;

/**
 * <p>
 * SQLServer 数据库分页语句组装实现
 * </p>
 */
public class SQLServerDialect implements PageDialect {

  public String buildPaginationSql(String originalSql, int offset, int limit) {
    StringBuffer sql = new StringBuffer(originalSql);
    sql.append(" OFFSET ").append(offset).append(" ROWS FETCH NEXT ");
    sql.append(limit).append(" ROWS ONLY");
    return sql.toString();
  }

}
